home *** CD-ROM | disk | FTP | other *** search
- on evaluateFloorPlan
- global gUserDataMan, gIso
- if not objectp(gIso) then
- return #isoEngineNotInstantiated
- end if
- problemList = []
- totalFloors = getTotalFloors(gUserDataMan)
- totalTilesMan = new(script("totalTileManager"))
- numTilesInHouse = getNumTilesInHouse(totalTilesMan)
- totalTilesMan = VOID
- subdivisionsUsedList = getUsedSubdivisions(gIso)
- bathroomTileList = [#a196, #a184, #a185, #a186, #a187]
- kitchenTileList = [#a191]
- subDivisionsInUse = [#a172, #a173, #a174, #a175, #a176, #a177, #a178, #a179, #a180, #a181, #a182, #a183, #a184, #a185, #a186, #a187, #a188, #a189, #a190, #a191, #a192, #a193, #a194, #a195, #a196]
- numTilesUsed = 0
- kitchenThere = 0
- bathroomThere = 0
- numListItems = count(subdivisionsUsedList)
- repeat with x = 1 to numListItems
- thisItem = getPropAt(subdivisionsUsedList, x)
- if not getOne(subDivisionsInUse, thisItem) then
- next repeat
- end if
- thisAmount = getAt(subdivisionsUsedList, x)
- if thisAmount > 0 then
- numTilesUsed = numTilesUsed + thisAmount
- if getOne(bathroomTileList, thisItem) then
- bathroomThere = 1
- end if
- if getOne(kitchenTileList, thisItem) then
- kitchenThere = 1
- end if
- end if
- end repeat
- floorPlanTrackingList = getFloorPlanTrackingList(gUserDataMan)
- if voidp(floorPlanTrackingList) then
- floorPlanTrackingList = [#exteriorDoor: 0, #staircase: 0]
- end if
- if floorPlanTrackingList[#exteriorDoor] < 1 then
- append(problemList, #ExtDoorMissing)
- end if
- if totalFloors > 1 then
- if floorPlanTrackingList[#staircase] < 1 then
- append(problemList, #stairCaseMissing)
- end if
- end if
- if not kitchenThere then
- append(problemList, #KitchenMissing)
- end if
- if not bathroomThere then
- append(problemList, #BathroomMissing)
- end if
- if numTilesInHouse > numTilesUsed then
- append(problemList, #UnassignedSpace)
- end if
- return problemList
- end
-